home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 251 < prev    next >
Encoding:
Text File  |  1996-08-05  |  804 b   |  36 lines

  1. Path: wwwserv1.shell.nl!news
  2. From: "Pauwl Lⁿnow" <P.LUNOW@snrper.simis.com>
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: help on syntax
  5. Date: 3 Jan 1996 12:45:42 GMT
  6. Organization: SNR Pernis
  7. Message-ID: <4cdtpm$6k3@wwwserv1.shell.nl>
  8. References: <96002.222728APCCU@CUNYVM.CUNY.EDU>
  9. NNTP-Posting-Host: gate.shell.nl
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 1.22 (Windows; I; 16bit)
  14.  
  15. Paul,
  16.  
  17. To me it looks like you should have done the following:
  18.  
  19.  if (c==(a-b))                  // DOUBLE == is equivalence!!
  20.     {
  21.      cout << "a: ";
  22.      cout << a;
  23.      :
  24.      :
  25.     }
  26. else
  27.     cout << "a-b.......
  28.  
  29. Your if statement stops after the first COUT. the else then doesn't 
  30. belong to anything!
  31.  
  32. Use them (*{}*) but keep them matched ;^}
  33.  
  34. Pauwl
  35.  
  36.